
module Documentation
  class Menu < Widget

    def build
      e :ul do
        Content::Document.repository.list.each do |p|
          e :li do
            if p.object.respond_to? 'title'
              link p.object.title.to_s, "read/"+p.uuid
            else
              link p.object.class.to_s, "read/"+p.uuid
            end
          end
        end
      end
    end
    
  end
end